package com.hung.pojo;

import java.util.Objects;

/**
 * 瓜圈事件类
 * @author Hung
 */
public class Matter {
    private Integer id;
    /**
     * pid(partId) 瓜圈id
     */
    private Integer pid;
    /**
     * uid(userId)发布者id
     */
    private Integer uid;
    /**
     * 发布时间
     */
    private String postTime;
    /**
     * commentId评论区id
     */
    private Integer commentId;
    /**
     * praise赞数量
     */
    private String praise;
    /**
     * content瓜内容本体
     */
    private String content;

    public Matter() {
    }

    public Matter(Integer id, Integer pid, Integer uid, String postTime, Integer commentId, String praise, String content) {
        this.id = id;
        this.pid = pid;
        this.uid = uid;
        this.postTime = postTime;
        this.commentId = commentId;
        this.praise = praise;
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Matter matter = (Matter) o;
        return Objects.equals(id, matter.id) && Objects.equals(pid, matter.pid) && Objects.equals(uid, matter.uid) && Objects.equals(postTime, matter.postTime) && Objects.equals(commentId, matter.commentId) && Objects.equals(praise, matter.praise) && Objects.equals(content, matter.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pid, uid, postTime, commentId, praise, content);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getPostTime() {
        return postTime;
    }

    public void setPostTime(String postTime) {
        this.postTime = postTime;
    }

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public String getPraise() {
        return praise;
    }

    public void setPraise(String praise) {
        this.praise = praise;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
